#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<assert.h>
int mystrlen(const char* p)
{
	assert(p);
	int size = 0;
	while (*p != '\0')
	{
		p++;
		size++;
	}
	return size;
}
char*mystrcat(char* dest, char* src)
{
	assert(dest);
	assert(src);
	char* ret = dest;
	while (*dest)
	{
		dest++;
	}
	while ((*dest++ = *src++))
	{
		;
	}
	return ret;
}
int mystrcmp(char* dest, const char* src)
{
	assert(dest && src);
	while (*dest == *src)
	{
		if (*dest == '\0')
			return 0;
		dest++;
		src++;
	}
	return *dest - *src;
}
char* mystrcpy(char* dest, const char* src)
{
	assert(dest && src);
	char* tmp = dest;
	while ((*dest++ = *src++))
	{
		;
	}
	return tmp;
}
int main()
{
	char arr[] = "abcdef";
	char arr1[20] = {0};
	char arr2[] = "ghigk";
	/*int tmp=mystrlen(arr);
	char*thu = mystrcat(arr, arr2);
	printf("%d ", tmp);
	while (*thu)
	{
		printf("%c", (*thu));
		thu++;
	}
	printf("\n");*/
	/*int thu = mystrcmp(arr, arr2);
	printf("%d\n", thu);*/
	char* input = mystrcpy(arr1, arr2);
	while (*input)
	{
		printf("%c", *input);
		input++;
	}
	printf("\n");
	return 0;
}